package org.finalministry.gui.components;

import java.awt.BorderLayout;

import javax.swing.JDesktopPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;

import org.finalministry.gui.GuiMain;

public class FinalMinistryPanel extends JPanel {

	private static final long serialVersionUID = 765892932052660980L;

	private GuiMain gui;

	public FinalMinistryPanel(GuiMain gui) {
		super(new BorderLayout());
		this.gui = gui;

		// First a split pane
		JScrollPane treeScrollPane = new JScrollPane(new FinalministryTree(gui));
		JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, treeScrollPane, new JDesktopPane());
		mainSplitPane.setDividerLocation(300);
		mainSplitPane.setOneTouchExpandable(true);

		mainSplitPane.setBounds(0, 0, gui.getBounds().width, gui.getBounds().height);

		this.add(mainSplitPane);
	}

}